package org.insia.smartposse.metier;

import java.util.HashSet;
import java.util.Set;

import org.insia.smartposse.metier.webservice.LightFreelance;


/**
 * Business class for Freelance.
 * 
 * @author sok hout
 *
 */
public class Freelance
extends User {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1881547089436907781L;
	private String _description;
	private double _fee;
	private Set<FreelanceSkill> _skillSet = new HashSet<FreelanceSkill>();
	private Set<FreelancePortfolio> _portfolioSet = new HashSet<FreelancePortfolio>();
	private Set<FreelanceAlert> _alertSet = new HashSet<FreelanceAlert>();
	

	/**
	 * Empty constructor.
	 *
	 */
	public Freelance() {
	}



	/**
	 * Full constructor
	 * @param id
	 * @param login
	 * @param password
	 * @param firstName
	 * @param lastName
	 * @param gender
	 * @param email
	 */
	public Freelance(long id, String login, String password, String firstName, String lastName, int gender, String email, String description, double fee) {
		super(id, login, password, firstName, lastName, gender, email);
		this._description = description;
		this._fee = fee;
	}

	/**
	 * Full setter
	 * @param id
	 * @param login
	 * @param password
	 * @param firstName
	 * @param lastName
	 * @param gender
	 * @param email
	 * @param description
	 * @param fee
	 */
	public void setParams(long id, String login, String password, String firstName, String lastName, int gender, String email, String description, double fee) {
		this._id = id;
		this._login = login;
		this._password = password;
		this._firstName = firstName;
		this._lastName = lastName;
		this._gender = gender;
		this._email = email;
		this._description = description;
		this._fee = fee;
	}


	/**
	 * Getter for the description made by the freelance.
	 * @return the description.
	 */
	public String getDescription() {
		return _description;
	}


	/**
	 * Setter for the description.
	 * @param description the description to set.
	 */
	public void setDescription(String description) {
		this._description = description;
	}


	/**
	 * Getter for the fee.
	 * @return the fee.
	 */
	public double getFee() {
		return _fee;
	}


	/**
	 * Setter for the fee.
	 * @param fee the fee to set.
	 */
	public void setFee(double fee) {
		this._fee = fee;
	}


	/**
	 * Getter for the automatic alerts of the freelance.
	 * @return the set of alerts.
	 */
	public Set<FreelanceAlert> getAlertSet() {
		return _alertSet;
	}


	/**
	 * Setter for the automatic alert.
	 * @param alertSet the set of FreelanceAlert to be set.
	 */
	public void setAlertSet(Set<FreelanceAlert> alertSet) {
		this._alertSet = alertSet;
	}


	/**
	 * Getter for the set of portfolio.
	 * @return the 
	 */
	public Set<FreelancePortfolio> getPortfolioSet() {
		return _portfolioSet;
	}


	/**
	 * Setter for the set of portfolio.
	 * @param portfolioSet the portfolio to set.
	 */
	public void setPortfolioSet(Set<FreelancePortfolio> portfolioSet) {
		this._portfolioSet = portfolioSet;
	}

	/**
	 * Getter for the set of skills.
	 * @return the set of skills.
	 */
	public Set<FreelanceSkill> getSkillSet() {
		return _skillSet;
	}


	/**
	 * Setter for the set of skills.
	 * @param skillSet the set of skill to set.
	 */
	public void setSkillSet(Set<FreelanceSkill> skillSet) {
		this._skillSet = skillSet;
	}
	/*
	 * (non-Javadoc)
	 * @see org.insia.smartposse.metier.User#setLight()
	 */
	public LightFreelance setLight() {
		LightFreelance lfree = new LightFreelance(this);
		return lfree;
	}
}
